﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Query.aspx.cs" Inherits="Admin.ALarm.Query" %>

<%@ Register Src="~/UserControls/PageControl.ascx" TagName="PageControl" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>预警信息查询</title>
    <link href="/Admin/Css/rightbar.css?FileVersion=<%=FileVersion %>" rel="stylesheet"
        type="text/css" />
    <script src="/Admin/Scripts/jquery-1.4.1.min.js?FileVersion=<%=FileVersion %>" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        //将页面内要打印的内容加入中间<!--startprint1-->打印区域<!--endprint1-->
        //打印按纽 onclick=preview(1)
        function preview(oper) {
            if (oper < 10) {
                bdhtml = window.document.body.innerHTML; //获取当前页的html代码
                sprnstr = "<!--startprint" + oper + "-->"; //设置打印开始区域
                eprnstr = "<!--endprint" + oper + "-->"; //设置打印结束区域
                prnhtml = bdhtml.substring(bdhtml.indexOf(sprnstr) + 18); //从开始代码向后取html
                prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr)); //从结束代码向前取html
                window.document.body.innerHTML = prnhtml;
                $("div:[name='printhidden']").css("display", "none");
                $("table:[name='printhidden']").css("display", "none");
                //                $("th").css("border-bottom", "1px solid #DDDDDD");
                //                $("th").css("border-top", "1px solid #DDDDDD");
                window.print();
                window.document.body.innerHTML = bdhtml;
                $("div:[name='printhidden']").css("display", "");
                $("table:[name='printhidden']").css("display", "");
                //                $("table:[name='printhidden'] th").css("border-bottom", "");
                //                $("table:[name='printhidden'] th").css("border-top", "");
            }
            else {
                window.print();
            }
        }   

    </script>
</head>
<body id="wallet">
    <!--startprint1-->
    <div class="warp">
        <div class="topnav" style="width: 880px;" name="printhidden">
            <ul>
                <li><a href="javascript:void(0);" style="cursor: default;" class="on_nav"><span>预警信息查询</span></a></li>
            </ul>
        </div>
        <div class="tab mt15" style="width: 880px;" name="printhidden">
            <ul>
                <li class="in_on"><strong>预警信息查询</strong></li>
            </ul>
        </div>
        <div class="cont" style="padding: 0; width: 878px;">
            <form id="searchForm" name="searchForm" action="Query.aspx">
            <input type="hidden" name="action" id="action" value="query" />
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="stb01" name="printhidden">
                <tr>
                    <td style="padding-top: 0; padding-left: 15px;" align="left" valign="middle" bgcolor="#F3FBFE">
                        房产证编号：<input type="text" name="txtCertificateID" id="txtCertificateID" value="<%=certificateID %>"
                            style="width: 105px;" />
                    </td>
                    <td style="padding-top: 0; padding-left: 10px;" height="34" align="left" valign="middle"
                        bgcolor="#F3FBFE">
                        税款属期：<select id="selYear" name="selYear" style="width: 75px;">
                            <%=CreateYear(year) %>
                        </select>
                    </td>
                    <td style="padding-top: 0px; padding-left: 10px; display: <%= isQueryDepartmentOnly ? "none" : "" %>;"
                        height="34" align="left" valign="middle" bgcolor="#F3FBFE">
                        所属部门：<select name="selDepart" id="selDepart" style="width: 115px;">
                            <option value="">请选择所属部门</option>
                            <%=OutputSelectOptions(dtDepartmet, "name", "id")%>
                        </select>
                    </td>
                    <td style="padding-top: 0; padding-left: 10px;" height="34" align="left" valign="middle"
                        bgcolor="#F3FBFE">
                        房产类型：<select id="selHouseType" name="selHouseType" style="width: 75px;">
                            <option value="">请选择</option>
                            <option value="自用">自用</option>
                            <option value="出租">出租</option>
                        </select>
                    </td>
                    <td style="padding-top: 0; padding-right: 20px;" valign="middle" align="right" bgcolor="#F3FBFE">
                        <div class="pl10">
                            <input name="imageField" id="Button1" type="submit" value="搜 索" />
                            <input name="imageField2" id="imageField2" type="submit" value="打 印" onclick="preview(1);return false;" /></div>
                    </td>
                </tr>
            </table>
            </form>
            <table width="878px" border="0" cellspacing="0" cellpadding="0" class="maintb" style="border-top: 0;"
                id="tbDataList">
                <asp:Repeater ID="rptDataList" runat="server">
                    <HeaderTemplate>
                        <tr>
                            <th width="45" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                税款<br />属期
                            </th>
                            <th width="75" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                所属部门
                            </th>
                            <th width="50" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                管理员
                            </th>
                            <th width="80" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                房产证
                            </th>
                            <th width="60" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                房主姓名
                            </th>
                            <th width="90" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                手机号
                            </th>
                            <th width="100" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                应缴税种
                            </th>
                            <th width="100" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                实缴税种
                            </th>
                            <th width="60" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                应缴金额
                            </th>
                            <th width="60" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                实缴金额
                            </th>
                            <th width="60" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                应补金额
                            </th>
                            <th width="60" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                承租姓名
                            </th>
                            <th width="60" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                承租手机
                            </th>
                            <th width="60" height="30" align="center" valign="middle" bgcolor="#DAF0FE">
                                门市名称
                            </th>
                        </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td align="center">
                                <%#Eval("Year")%>
                            </td>
                            <td align="center">
                                <%#Eval("DepartmentName")%>
                            </td>
                            <td align="center">
                                <%#Eval("ManagerName")%>
                            </td>
                            <td align="center">
                                <%#Eval("CertificateID")%>
                            </td>
                            <td align="center">
                                <%#Eval("Name")%>
                            </td>
                            <td align="center">
                                <%#Eval("MobileCode")%>
                            </td>
                            <td align="left" style="padding-left: 2px;">
                                <%#Eval("RequireTax")%><%--<%#FormatData<DateTime>(Eval("ComDate"), "yyyy-MM-dd")%>--%>
                            </td>
                            <td align="left" style="padding-left: 2px;">
                                <%#Eval("CompleteTax")%>
                            </td>
                            <td align="right" style="padding-right: 2px;">
                                <%#Eval("TotalTax")%>
                            </td>
                            <td align="right" style="padding-right: 2px;">
                                <%#Eval("bTotalTax")%>
                            </td>
                            <td align="right" style="padding-right: 2px;">
                                <%# (Decimal.Parse(Eval("TotalTax").ToString()) - Decimal.Parse(Eval("bTotalTax").ToString()))%>
                            </td>
                            <td align="center">
                                <%#Eval("RentName")%>
                            </td>
                            <td align="center">
                                <%#Eval("RentMobileCode")%>
                            </td>
                            <td align="center">
                                <%#Eval("ShopName")%>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>
        <div style="text-align: right;" style="width: 880px;">
            <form runat="server" id="pageForm24">
            <uc1:PageControl ID="pageCountrol" runat="server" />
            </form>
        </div>
        <div class="btudiv" style="padding-top: 15px; float: none; height: 22px; width: 93%;"
            name="printhidden">
            <ul style="width: 170px;">
                <li><a id="a1" class=" btuyellow_arrow" href="<%= pageUrl%>&action=download"
                    target="_blank"><span>下载报表</span></a></li></ul>
        </div>
    </div>
    <!--endprint1-->
    <script type="text/javascript">
        //隔行变色
        jQuery(function ($) {
            $("#tbDataList tr:even").css("background-color", "#F9F9F9");
            $(":input[name='selHouseType']").val('<%=houseType %>');
            $(":input[name='selYear']").val('<%=year %>');
            $(":input[name='selDepart']").val('<%=departmentID %>');
        });
    </script>
</body>
</html>
